package com.itheima.web.service.impl.pms;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.service.pms.ProductSevice;
import com.itheima.service.ums.AdminService;
import com.itheima.vo.pms.Product;
import com.itheima.vo.ums.UmsAdmin;
import com.itheima.web.mapper.pms.ProductMapper;
import com.itheima.web.mapper.ums.AdminMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductSevice {

    @Autowired
    private ProductMapper productMapper;


    @Override
    public List<Product> pageInfo(int pageNum, int pageSize, Product product) {
        return productMapper.pageInfo(pageNum,pageSize,product);
    }

    @Override
    public Product selectByKeyword(String keyword) {
        return productMapper.selectByKeyword(keyword);
    }

    @Override
    public void updateByIds(List<Integer> ids, Integer deleteStatus) {
        productMapper.updateByIds(ids,deleteStatus);
    }

    @Override
    public void updateWithNewStatus(List<Integer> ids, Integer newStatus) {
        productMapper.updateWithNewStatus(ids,newStatus);
    }

    @Override
    public void updateWithPublishStatus(List<Integer> ids, Integer publishStatus) {
        productMapper.updateWithPublishStatus(ids,publishStatus);
    }

    @Override
    public void updateWithreCommendStatus(List<Integer> ids, Integer recommendStatus) {
        productMapper.updateWithreCommendStatus(ids,recommendStatus);
    }

    @Override
    public void updateWithreVerifyStatus(List<Integer> ids, Integer verifyStatus) {
        productMapper.updateWithreVerifyStatus(ids,verifyStatus);
    }

    @Override
    public Product getBy(Integer id) {
        return productMapper.get(id);
    }

    @Override
    public long countByStatus(Product product) {
        return productMapper.countByStatus(product);
    }
}
